#include "activecoderesponse.h"

#include <QVariant>
#include <QDebug>

ActiveCodeResponse::ActiveCodeResponse(QObject *parent) :
    JSONResponse(parent)
{
    connect(this,
            &JSONResponse::notifyError,
            this,
            &ActiveCodeResponse::onNotifyError );
}

void ActiveCodeResponse::onNotifyError(int error)
{
    m_error = error;
}

void ActiveCodeResponse::parse(const QVariant &data)
{
    qDebug() << data;
    if (data.type() != QVariant::Map){
        setError(Response::Property, "The field of error code is incompatible");
        return;
    }
}

